package com.zide.framework.web.domain.vo.search;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.zide.common.annotation.Excel;
import com.zide.common.core.domain.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.Set;

/**
 * @author 石添
 * @date 2024/2/25
 */
@Schema(description = "搜索入参 - 角色")
@Data
public class SysRoleSearchVO extends PageParam {

    private Long roleId;

    private String roleName;

    private String roleKey;

    private Integer roleSort;

    private String dataScope;

    private boolean menuCheckStrictly;


    private boolean deptCheckStrictly;

    private Integer status;

    @Schema(description = "逻辑删除【0：未删除，1：已删除】")
    private Integer deleted;

    private boolean flag = false;

    private Long[] menuIds;

    private Long[] deptIds;

    private Set<String> permissions;

    public boolean isAdmin() {
        return isAdmin(this.roleId);
    }

    public static boolean isAdmin(Long roleId) {
        return roleId != null && 1L == roleId;
    }
}
